<?php
namespace app\blog\controller;

use app\blog\controller\Front;

class Tags extends Front
{
    protected function initialize()
    {
        parent::initialize(); 
    }
    
    public function index()
    {
        $this->site['title'] = $this->seoReplace(config('page.tags_title'),true);
        $this->site['keywords'] = $this->seoReplace(config('page.tags_keywords'));
        $this->site['description'] = $this->seoReplace(config('page.tags_description'));
        $this->site['data'] = model('blog/Tag','loglic')->all([
            'cache' => config('cache.expire_items'),
            'limit' => xfEmpty(config('page.tags_total'),60),
            'order' => [
                'tag_count' => 'desc',
            ],
            'where' => [
                ['tag_status','eq','normal'],
            ],
        ]);
        $this->assign($this->site);
        return $this->fetch();
    }
}